import request from '@/utils/request'

// 获取人员列表
export const getUser = params => request.get('/api/user-service/user/search', { params })

// 获取角色列表
export const getRole = params => request.get('/api/user-service/role', { params })

// 获取区域列表
export const getRegion = params => request.get('/api/vm-service/region/search', { params })

// 新增人员
export const addUser = data => request.post('/api/user-service/user', data)

// 修改人员
export const putUser = data => request({
  method: 'PUT',
  url: '/api/user-service/user/' + data.id,
  data: data.data
})

// 删除人员
export const delUser = id => request.delete('/api/user-service/user/' + id)

// 获取工作量列表
export const searchUserWork = params => request.get('/api/user-service/user/searchUserWork', { params })

// 获取工作量列表
export const getUserWork = params => request.get('/api/task-service/task/userWork', { params })

// 获取人员基本信息
export const getUserInos = id => request.get('/api/user-service/user/' + id)
